GM.Name 		= "GJail"
GM.Author 		= "Enrico"
GM.Email 		= ""
GM.Website 		= "www.gmod-univers.com"
GM.TeamBased	= true

DeriveGamemode("base")

/*---------------------------------------------------------
   Name: gamemode:CreateTeams()
   Desc: Note - HAS to be shared.
---------------------------------------------------------*/
function GM:CreateTeams()
	TEAM_GUARD = 1
	team.SetUp( TEAM_GUARD, "Gardiens", Color( 0, 0, 255 ) )
	team.SetSpawnPoint( TEAM_GUARD, "info_player_counterterrorist" )
	
	TEAM_PRISONER = 2
	team.SetUp( TEAM_PRISONER, "Prisonniers", Color( 255, 0, 0 ) )
	team.SetSpawnPoint( TEAM_PRISONER, "info_player_terrorist" )

	TEAM_GUARD_DEAD = 3
	team.SetUp( TEAM_GUARD_DEAD, "Gardiens Morts", Color( 0, 0, 128 ) )

	TEAM_PRISONER_DEAD = 4
	team.SetUp( TEAM_PRISONER_DEAD, "Prisonniers Morts", Color( 128, 0, 0 ) )
	
	--team.SetSpawnPoint( TEAM_SPECTATOR, "worldspawn" )
end

/*---------------------------------------------------------
   Name: gamemode:PhysgunPickup( )
   Desc: Return true if player can pickup entity
---------------------------------------------------------*/
function GM:PhysgunPickup( ply, ent )
	return true
end

/*---------------------------------------------------------
   Name: gamemode:CanPlayerSuicide( ply )
   Desc: Player typed KILL in the console. Can they kill themselves?
---------------------------------------------------------*/
function GM:CanPlayerSuicide( ply )
	if ply:Team() == TEAM_GUARD or ply:Team() == TEAM_PRISONER then
		return true
	else
		return false
	end
end